//////////////////////////////////////////////////////////////////////////////////
//	File	:	Particle.h
//	Author	:	Yuri Oyoko
//	Purpose	:	Particle contains the Partcle class which defines 
//				the particle object used in the game. The particle 
//				is created and managed by the base particle system.
//////////////////////////////////////////////////////////////////////////////////
#pragma once

#include "BaseObject.h"
#include <windows.h>
#include <d3dx9.h>

class Particle : public BaseObject
{
	D3DXVECTOR2 Acceleration;
	
	float Lifetime;
	float TimeSinceStart;
	float Scale;
	float Rotation;
	float RotationSpeed;


public:
	float SecondsTicker;
	Particle();
	~Particle();
	//Base Interface functions
	void Update(float ElapsedTime);
	void Render();
	RECT GetCollisionRect();
	bool CheckCollision();

	//Accessors
	D3DXVECTOR2 GetAcceleration(){return Acceleration;}
	float GetLifetime(){return Lifetime;}
	float GetTimeSinceStart(){return TimeSinceStart;}
	//Mutators
	void SetAcceleration(D3DXVECTOR2 Value){Acceleration = Value;}
	void SetAccelerationX(float Value){Acceleration.x = Value;}
	void SetAccelerationY(float Value){Acceleration.y = Value;}
	void Initialize(D3DXVECTOR2 thePosition, D3DXVECTOR2 theVelocity, D3DXVECTOR2 theAcceleration, float theLifetime, float theScale, float theRotation, float theRotationSpeed);
	void SetTimeSinceStart(float Value){TimeSinceStart = Value;}
};